package pl.softech.gpw.candles.editor.meta;

import pl.softech.gpw.candles.patterns.ICandlePatternMetaData;

public class CandlestickPatternMetaDataImpl implements ICandlePatternMetaData {

    private Direction direction = Direction.BEARICH;
    private Type type = Type.CONTINUATION;
    private Reliability reliability = Reliability.UNKNOWN;
    private int barCount = 0;

    @Override
    public Type getType() {
        return type;
    }

    public void setDirection(Direction direction) {
        this.direction = direction;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public void setReliability(Reliability reliability) {
        this.reliability = reliability;
    }

    @Override
    public int getBarCount() {
        return barCount;
    }

    public void setBarCount(int barCount) {
        this.barCount = barCount;
    }

    @Override
    public Direction getDirection() {
        return direction;
    }

    @Override
    public Reliability getReliability() {
        return reliability;
    }

    public void derive(ICandlePatternMetaData m) {
        direction = m.getDirection();
        type = m.getType();
        reliability = m.getReliability();
    }

    @Override
    public String toString() {
        return "CandlestickPatternMetaDataImpl [direction=" + direction + ", type=" + type + ", reliability="
                + reliability + ", barCount=" + barCount + "]";
    }

}
